import request from '@/utils/request'
// 用户注册
export const register = (data) => {
  return request.post('/user/registered', data)
}
// 用户登录
export const login = (data) => {
  return request.post('/user/login', data)
}
// 获取用户信息
export const getUser = (data) => {
  return request.get('/user', data)
}

// 获取收藏
export const getCollect = (data) => {
  return request.get('/user/favorites', data)
}

//我的出租
export const manageHouse = (data) => {
  return request.get('/user/houses', data)
}

//发布房源
export const releaseHouse = (data) => {
  return request.get('/houses/params', data)
}

// 获取城市列表数据
export const getCity = (level) => { 
  return request.get('/area/city', {params: {level}})
}
// 获取热门城市
export const getHotCity = () => { 
  return request.get('/area/hot')
}
// 获取子城市
export const getChildrenCity = () => { 
  return request.get('/area')
}
// 获取城市信息
export const getCityInfo = (id) => { 
  return request.get('/area/map',{params:{id}})
}